function load_movie(data) {
    var str = '';
    for (var i = 0; i < data.info.length; i++) {
        var row = data.info[i];
        str +=
            '<p class="ul"></p>\n' +
            '<table width="100%" class="">\n' +
            '    <tbody>\n' +
            '    <tr>\n' +
            '        <td width="100">\n' +
            '            <a class="nbg"\n' +
            '               href=""\n' +
            '               title="' + row.movie_name + '">\n' +
            '                <img src="' + row.url + '"\n' +
            '                     width="75" alt="' + row.movie_name + '" class="">\n' +
            '            </a>\n' +
            '        </td>\n' +
            '        <td >\n' +
            '            <div class="pl2">\n' +
            '                <a href="/movie/single/?movie_id=' + row.id + '"\n' +
            '                   class="">\n' +
            '                    ' + row.movie_name + '\n' +
            '                    / <span\n' +
            '                        style="font-size:13px;"></span>\n' +
            '                </a>\n' +
            '                <p class="pl">' + row.release_date + ' ' + row.country + ' ' + row.directors + row.actors + '</p>\n' +
            '                <div class="star clearfix">\n' +
            '                    <span class="allstar45"></span>\n' +
            '                    <span class="rating_nums">' + row.score + '</span>\n' +
            '                    <span class="pl">' + row.click_num + '</span>\n' +
            '                </div>\n' +
            '            </div>\n' +
            '        </td>\n' +
            '    </tr>\n' +
            '    </tbody>\n' +
            '</table>'
    }
    return str;
}

function parise_movie() {
    $.get('/user/user_parise/', {}, function (data) {
        data = JSON.parse(data);
        // 处理异常
        if (data.status == 200) {
            var str = load_movie(data);
            if (str == '') {
                str = '<div class="my_picture">\n' +
                    '                        <p>暂无点赞记录,快去为你稀饭的电影点赞吧</p>\n' +
                    '</div>'
            }
            $('.movie_parise').append(str);
        } else {
        }
    })
}

function star_movie() {
    console.log(star_movie);
    $.get('/user/user_star/', {}, function (data) {
        data = JSON.parse(data);
        // 处理异常
        if (data.status == 200) {
            var str = load_movie(data);
            if (str == '') {
                str = '<div class="my_picture">\n' +
                    '                        <p>暂无点赞记录,快去点赞你稀饭的电影吧</p>\n' +
                    '</div>'
            }
            $('.movie_star').append(str);
        } else {
        }
    })
}